import request from '@/utils/request'

// 登录
export const login = (data) => {
  return request({
    url: '/manager/login',
    method: 'post',
    data
  })
}

// 获取验证码

export const auth = (params) => {
  return request({
    url: '/manager/captcha',
    responseType: 'blob', // 必须说明 axios 请求类型
    params
  })
}

// 获取树状机构信息
export const getTree = () => {
  return request({
    url: '/manager/business-hall/tree'
  })
}

// 文件上传
export const upload = (data) => {
  return request({
    url: '/manager/files/imageUpload',
    method: 'post',
    data
  })
}
